<%@ page pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>using commons fileupload to upload file </title>
</head>

<body>
<div align="center">
  <p>请选择需要上传的文件</p>
  <form action="<%=request.getContextPath()%>/servlet/upload" method="post" enctype="multipart/form-data" name="form1" id="form1">
    <table width="334" border="1">
      <tr>
        <td width="150">上传人：</td>
        <td width="168"><label>
          <input type="text" name="name" id="name" />
        </label></td>
      </tr>
      <tr>
        <td>上传文件：</td>
        <td><label>
          <input type="file" name="uploadfile" id="uploadfile" />
        </label></td>
      </tr>
      <tr>
        <td><label>
          <input type="reset" name="button" id="button" value="重置" />
        </label></td>
        <td><label>
          <input type="submit" name="button2" id="button2" value="提交" />
        </label></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
  </form>
  <p>&nbsp;</p>
  <p>&nbsp;  </p>
</div>
</body>
</html>
